package payroll.webapp

class EmpSalaryDefinition implements Serializable{
	
	Integer empid
	Date effectiveDate
	BigDecimal basicSalary
	BigDecimal monthlyIncentives
	BigDecimal houseAllowance
	BigDecimal otherAllowance
	BigDecimal _13monthSalary
	BigDecimal totalSalary
	Integer annualLeaves
	Integer sickLeaves
	SalaryCalcTypes salCalcTypes
	Integer insuranceNumber
	Integer housingInsuranceNumber
	Date dateCreated
	Date lastUpdated
	String createdBy
	String lastModifiedBy
	
    static constraints = {
		empid(nullable:false, unique:true)
		effectiveDate(nullable:false, unique:true)
		basicSalary(nullable:false)
		monthlyIncentives(nullable:false)
		houseAllowance(nullable:false)
		otherAllowance(nullable:false)
		_13monthSalary(nullable:false)
		totalSalary(nullable:false)
		annualLeaves(nullable:false)
		sickLeaves(nullable:false)
		salCalcTypes(nullable:false)//Salary Calculation Types
		insuranceNumber(nullable:false)
		housingInsuranceNumber(nullable:false)
		dateCreated(nullable:true)
		lastUpdated(nullable:true)
		createdBy(nullable:true)
		lastModifiedBy(nullable:true)
    }

	static belongsTo = [employee:Employee]
	
	static mapping = {
		table "EmpSalaryDefinition"
		id composite:['empid', 'effectiveDate']
	}
}
